package aaaBrowser;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

public class aaa {

	public static void main(String[] args) {
		com.mysql.jdbc.Driver
		String s = "7+8=? ";
		s = s.trim().replaceAll("=\\?", "");
		ScriptEngineManager mgr = new ScriptEngineManager();
		ScriptEngine jsEngine = mgr.getEngineByName("JavaScript");

		try {
			System.out.println(s);
			Double o = (Double) jsEngine.eval(s);
			System.out.println(o.intValue());
		} catch (Exception ex) {
			ex.printStackTrace();
		}

	}

}
